#ifndef DATE_H
#define DATE_H


class Date
{
    public:
        Date();
        Date(char strDate[]);
        Date(int Y, int M, int D);
        void setDate(int Y, int M, int D);
        void show()const;
        int getYear();
        void setYear(int Y);
        int getMonth();
        void setMonth(int M);
        int getDay();
        void setDay(int D);
        char*toString();
        int daysPerMonth(int y = -1)const;
        int daysPerYear(int y = -1)const;
        int compare(const Date &date)const;
        bool isLeapYear(int y = -1)const;
        int subDate(const Date &date)const;
        Date subDays(int days)const;
        Date addDays(int days)const;
        virtual ~Date();

    protected:

    private:
        int year,month,day;
        void addOneDay();
        void subOneDay();
        int subSma11Date(const Date &dat)const;
};

#endif // DATE_H
